package org.cjlm.ui.pub;

import javax.swing.*;

public class MMenu extends JMenu {
    private String code;
    private String name;

    public MMenu(String code, String name) {
        super(name);
        this.code = code;
        this.name = name;
    }

    public MMenu addMMenu(JComponent comp){
        super.add(comp);
        return this;
    }

    public MMenu addMMenu(Action action){
        super.add(action);
        return this;
    }

    public String getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }
}
